
#include <QApplication>
#include "mainwindow.h"
#include <QTextCodec>


int main(int argc, char *argv[])
{
    setlocale( LC_ALL, "RUS" );

#if defined( Q_OS_LINUX )
    //QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "UTF-8" ) );
    QTextCodec * russianCodec = QTextCodec::codecForName( "UTF-8" );
#elif defined( Q_OS_WIN )
    //QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "IBM 866" ) );
    //QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "Windows-1251" ) );
    QTextCodec * russianCodec = QTextCodec::codecForName( "Windows-1251" );
#endif

    QTextCodec::setCodecForTr( russianCodec );
    QTextCodec::setCodecForCStrings( russianCodec );
    QTextCodec::setCodecForLocale( russianCodec );

    QApplication a(argc, argv);

    MainWindow w;
    w.show();

    return a.exec();
}
